/**
 * ================================前端页面================================
 */
// 根组件
const Layout = () => import('@/views/FrontViews/Layout/index.vue')
// 商店模块
const Category = () => import('@/views/FrontViews/StoreModule/Category/index.vue')
const Discount = () => import('@/views/FrontViews/StoreModule/Discount/index.vue')
const Pay = () => import('@/views/FrontViews/StoreModule/Pay/index.vue')
const PaySuccess = () => import('@/views/FrontViews/StoreModule/PaySuccess/index.vue')
const Detail = () => import('@/views/FrontViews/StoreModule/Detail/index.vue')
const Home = () => import('@/views/FrontViews/StoreModule/Home/index.vue')
const NewGame = () => import('@/views/FrontViews/StoreModule/NewGame/index.vue')
const Cart = () => import('@/views/FrontViews/StoreModule/Cart/index.vue')
const Publisher = () => import('@/views/FrontViews/StoreModule/Publisher/index.vue')
const Ranking = () => import('@/views/FrontViews/StoreModule/Ranking/index.vue')
const Search = () => import('@/views/FrontViews/StoreModule/Search/index.vue')
const StoreLayout = () => import('@/views/FrontViews/StoreModule/StoreLayout/index.vue')
// 用户模块
const Ban = () => import('@/views/FrontViews/UserModule/Ban/index.vue')
const BillDetail = () => import('@/views/FrontViews/UserModule/BillDetail/index.vue')
const BillList = () => import('@/views/FrontViews/UserModule/BillList/index.vue')
const Edit = () => import('@/views/FrontViews/UserModule/Edit/index.vue')
const Friend = () => import('@/views/FrontViews/UserModule/Friend/index.vue')
const GameDetail = () => import('@/views/FrontViews/UserModule/GameDetail/index.vue')
const GameList = () => import('@/views/FrontViews/UserModule/GameList/index.vue')
const Login = () => import('@/views/FrontViews/UserModule/Login/index.vue')
const Register = () => import('@/views/FrontViews/UserModule/Register/index.vue')
const User = () => import('@/views/FrontViews/UserModule/User/index.vue')
const UserLayout = () => import('@/views/FrontViews/UserModule/UserLayout/index.vue')
const Wallet = () => import('@/views/FrontViews/UserModule/Wallet/index.vue')
const Wishlist = () => import('@/views/FrontViews/UserModule/Wishlist/index.vue')
// 新闻模块
const NewsLayout = () => import('@/views/FrontViews/NewsModule/index.vue')
const News = () => import('@/views/FrontViews/NewsModule/News/index.vue')
const NewsDetail = () => import('@/views/FrontViews/NewsModule/NewsDetail/index.vue')
// 客服模块
const CustomerLayout = () => import('@/views/FrontViews/CoustomerModule/index.vue')
const CustomerChat = () => import('@/views/FrontViews/CoustomerModule/CustomerChat/index.vue')
const Customer = () => import('@/views/FrontViews/CoustomerModule/Customer/index.vue')
const ForgetPassword = () => import('@/views/FrontViews/CoustomerModule/ForgetPassword/index.vue')
const Game = () => import('@/views/FrontViews/CoustomerModule/Game/index.vue')
const Modify = () => import('@/views/FrontViews/CoustomerModule/Modify/index.vue')
// 聊天模块
const ChatLayout = () => import('@/views/FrontViews/ChatModule/index.vue')
const Chat = () => import('@/views/FrontViews/ChatModule/Chat/index.vue')

export const frontRoutes = [
    // 前端路由
    {
        path: '/',
        component: Layout,
        children: [
            {
                path: '',
                component: StoreLayout,
                children: [
                    {
                        path: '',
                        component: Home
                    },
                    {
                        path: 'store/newgame',
                        component: NewGame
                    },
                    {
                        path: 'store/category/:id',
                        component: Category
                    },
                    {
                        path: 'store/ranking/:type',
                        component: Ranking
                    },
                    {
                        path: 'store/discount',
                        component: Discount
                    },
                    {
                        path: 'store/search',
                        component: Search
                    },
                    {
                        path: 'pay',
                        component: Pay
                    },
                    {
                        path: 'pay/success',
                        component: PaySuccess
                    },
                    {
                        path: 'store/detail/:id',
                        component: Detail
                    },
                    {
                        path: 'cart',
                        component: Cart
                    },
                    {
                        path: 'store/publisher',
                        component: Publisher
                    },
                    {
                        path: 'wishlist',
                        component: Wishlist
                    }
                ]
            },
            {
                path: 'user',
                component: UserLayout,
                children: [
                    {
                        path: '',
                        component: User
                    },
                    {
                        path: 'ban',
                        component: Ban
                    },
                    {
                        path: 'bill',
                        component: BillList
                    },
                    {
                        path: 'bill/detail',
                        component: BillDetail
                    },
                    {
                        path: 'info/edit',
                        component: Edit
                    },
                    {
                        path: 'friend/:username',
                        component: Friend
                    },
                    {
                        path: 'game',
                        component: GameList
                    },
                    {
                        path: 'game/detail',
                        component: GameDetail
                    },
                    {
                        path: 'wallet',
                        component: Wallet
                    }
                ]
            },
            {
                path: 'customer',
                component: CustomerLayout,
                children: [
                    {
                        path: '',
                        component: Customer
                    },
                    {
                        path: 'modify',
                        component: Modify
                    },
                    {
                        path: 'game',
                        component: Game
                    },
                    {
                        path: 'chat',
                        component: CustomerChat
                    }
                ]
            },
            {
                path: 'news',
                component: NewsLayout,
                children: [
                    {
                        path: '',
                        component: News
                    },
                    {
                        path: 'news/detail',
                        component: NewsDetail
                    }
                ]
            },
            {
                path: 'chat',
                component: ChatLayout,
                children: [
                    {
                        path: '',
                        component: Chat
                    }
                ]
            },
            {
                path: 'login',
                component: Login
            },
            {
                path: 'register',
                component: Register
            },
            {
                path: 'fgtpwd',
                component: ForgetPassword
            },
        ]
    },
]
